---
layout: m1x_soap
title: Sales Order
---
				    
				    <h2><a name="MAPI-Order-Module%3AMageSales"></a>Module: Mage_Sales</h2>

<p>The Mage_Sales module allows you to manage sales orders, invoices, shipments, and credit memos.</p>

<h4><a name="MAPI-Order-Order"></a>Order</h4>

<p>Allows you to manage orders.</p>

<p><b>Resource Name</b>: sales_order</p>

<p><b>Aliases</b>:</p>
<ul>
	<li>order</li>
</ul>


<p><b>Methods</b>:</p>
<ul>
	<li><a href="sales_order.list.html" title="sales_order.list">sales_order.list</a><font color="#000000">&nbsp;&#45; Retrieve the list of orders using filters</font></li>
	<li><a href="sales_order.info.html" title="sales_order.info">sales_order.info</a><font color="#000000">&nbsp;&#45; Retrieve the order information</font></li>
	<li><a href="sales_order.addComment.html" title="sales_order.addComment">sales_order.addComment</a><font color="#000000">&nbsp;&#45; Add a comment to an order</font></li>
	<li><a href="sales_order.hold.html" title="sales_order.hold">sales_order.hold</a><font color="#000000">&nbsp;&#45; Hold an order</font></li>
	<li><a href="sales_order.unhold.html" title="sales_order.unhold">sales_order.unhold</a><font color="#000000">&nbsp;&#45; Unhold an order</font></li>
	<li><a href="sales_order.cancel.html" title="sales_order.cancel">sales_order.cancel</a><font color="#000000">&nbsp;&#45; Cancel an order</font></li>
</ul>


<h4><a name="MAPI-Order-Faults"></a>Faults</h4>


<table><tbody>
<tr>
<th> <font color="#555555">Fault Code</font> </th>
<th> <font color="#555555">Fault Message</font> </th>
</tr>
<tr>
<td> <font color="#555555">100</font> </td>
<td> <font color="#555555">Requested order not exists.</font> </td>
</tr>
<tr>
<td> <font color="#555555">101</font> </td>
<td> <font color="#555555">Invalid filters given. Details in error message.</font> </td>
</tr>
<tr>
<td> <font color="#555555">102</font> </td>
<td> <font color="#555555">Invalid data given. Details in error message.</font> </td>
</tr>
<tr>
<td> <font color="#555555">103</font> </td>
<td> <font color="#555555">Order status not changed. Details in error message.</font> </td>
</tr>
</tbody></table>


<h4><a name="MAPI-Order-Examples"></a>Examples</h4>

<h5><a name="MAPI-Order-Example1.Workwithorders"></a>Example 1. Work with orders</h5>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div id="root">
		<pre class="theme: Default; brush: java; gutter: false">$proxy = new SoapClient('http://magentohost/api/soap/?wsdl');
$sessionId = $proxy-&gt;login('apiUser', 'apiKey');

// Getting list of orders created by John Doe
var_dump($proxy-&gt;call($sessionId, 'sales_order.list', array(array('customer_firstname'=&gt;array('eq'=&gt;'John'), 'customer_lastname'=&gt;array('eq'=&gt;'Doe')))));


// Get order info 100000003
var_dump($proxy-&gt;call($sessionId, 'sales_order.info', '100000003'));


// Hold order 100000003
$proxy-&gt;call($sessionId, 'sales_order.hold', '100000003');

// Unhold order 100000003
$proxy-&gt;call($sessionId, 'sales_order.unhold', '100000003');

// Hold order and add comment 100000003
$proxy-&gt;call($sessionId, 'sales_order.addComment', array('100000003', 'holded',  'You order is holded',  true));

// Unhold order and add comment 100000003
$proxy-&gt;call($sessionId, 'sales_order.addComment', array('100000003', 'pending', 'You order is pending', true));

// Get order info 100000003
var_dump($proxy-&gt;call($sessionId, 'sales_order.info', '100000003'));</pre>
		</div>
</div></div>

				    
<?php include(__ROOT__ . 'footer.php'); ?>
                    			    
